package com.cq.hd.order.controller;

import com.cq.hd.common.response.Result;
import com.cq.hd.common.response.ResultGenerator;
import com.cq.hd.order.api.TbOrderFirstRecordApi;
import com.cq.hd.order.api.dto.OrderFirstRecordDto;
import com.cq.hd.order.api.vo.OrderFirstRecordVo;
import com.cq.hd.order.service.TbOrderFirstRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 首次下单用户记录表 前端控制器
 * </p>
 *
 * @author mYunYu
 * @since 2024-01-11
 */
@RestController
public class TbOrderFirstRecordController implements TbOrderFirstRecordApi {

    @Autowired
    private TbOrderFirstRecordService orderFirstRecordService;

    @Override
    public Result<List<OrderFirstRecordVo>> listByDto(OrderFirstRecordDto orderFirstRecordDto) {
        return ResultGenerator.success(orderFirstRecordService.listByDto(orderFirstRecordDto));
    }
}
